<?php
	require_once(dirname(__FILE__)."/../include/common.inc.php");
	$TotalResult = 0;
	
	$str = $_POST['disorder'];
	
	$orwhere = " AND disorder = $str ";
	
	$cquery = "SELECT COUNT(*) AS num FROM dede_sys_enum WHERE egroup = 'addontype' $orwhere";
	
	$nRow = $dsql->GetOne($cquery);
	if(is_array($nRow))
	{
		$TotalResult = $nRow['num'];
	}
	
	if($TotalResult == 0){
		print_r("notData");
	}else{
		$query = "SELECT * FROM dede_sys_enum WHERE egroup = 'addontype' $orwhere";
		$dsql->SetQuery($query);
		$dsql->Execute();
		$arr = array();

		while($row = $dsql->GetArray())
		{
			array_push($arr,$row);
		}
		print_r(json_encode($arr));
	}
	
?>